package com.ssm.dao;

import com.ssm.domain.SysLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ISysLogDao {

    @Insert("insert into syslog(id, visitTime, username, ip, url, executionTime , method) values(#{id} ,#{visitTime}, #{username}, #{ip}, #{url}, #{executionTime}, #{method})")
    void save(SysLog sysLog);

   /* @Select("select * from syslog order by id DESC limit 1")
    SysLog countId();*/

    @Select("select * from syslog")
    List<SysLog> findAllSysLog();

    @Select("select * from syslog")
    List<SysLog> findAll(Integer page, Integer size);
}
